//
// Created by ZhangBo on 2019-06-17.
// Copyright (c) 2019 ZhangBo. All rights reserved.
//

import Foundation
import Alamofire

enum HomeNetConfig {
    case newsTitles
    case searchSuggestInfo
    case newsFeeds
    case moreNewsFeeds
}

extension HomeNetConfig: LYNetTargetType{
    var baseURL: String {
        return BASE_URL
    }
    
    var path: String {
        switch self {
        case .newsTitles:
            return "/article/category/get_subscribed/v1/?"
        case .searchSuggestInfo:
            return "/search/suggest/homepage_suggest/?"
        case .newsFeeds:
            return "/api/news/feed/v75/?"
        case .moreNewsFeeds:
            return "/api/news/feed/v75/?"
        }
    }
    
    var urlStr: String {
        return baseURL + path
    }
    
    var method: HTTPMethod {
        return .get
    }
    
    var needCache: Bool {
        return false
    }
    
    var headers: [String : String]? {
        return ["":""]
    }
    
    
}
